package com.css.dzj.dzjap.modules.lawenforcesuper.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 审查专家监管信息表关联专家Entity
 */
@Entity
@Table(name = "EXPREGULAT_CONNECT_EXPERT", schema = "DZJAP", catalog = "")
public class ExpregulatConnectExpertEntity {
    private String id;
    private String regulatId;
    private String expertId;
    /**
     * 执法人员抽取状态
     * 0、未抽取 1、已抽取
     */
    private String cqStatus;
    private Date createTime;
    private String createPerson;
    private Date updateTime;
    private String updatePerson;
    private String taskId;

    @Id
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjap.common.util.SnowflakeId")
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "REGULAT_ID")
    public String getRegulatId() {
        return regulatId;
    }

    public void setRegulatId(String regulatId) {
        this.regulatId = regulatId;
    }

    @Basic
    @Column(name = "EXPERT_ID")
    public String getExpertId() {
        return expertId;
    }

    public void setExpertId(String expertId) {
        this.expertId = expertId;
    }

    @Basic
    @Column(name = "CQ_STATUS")
    public String getCqStatus() {
        return cqStatus;
    }

    public void setCqStatus(String cqStatus) {
        this.cqStatus = cqStatus;
    }

    @Basic
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "CREATE_PERSON")
    public String getCreatePerson() {
        return createPerson;
    }

    public void setCreatePerson(String createPerson) {
        this.createPerson = createPerson;
    }

    @Basic
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Column(name = "UPDATE_TIME")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "UPDATE_PERSON")
    public String getUpdatePerson() {
        return updatePerson;
    }

    public void setUpdatePerson(String updatePerson) {
        this.updatePerson = updatePerson;
    }

    @Basic
    @Column(name = "TASK_ID")
    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) { return false; }
        ExpregulatConnectExpertEntity that = (ExpregulatConnectExpertEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(regulatId, that.regulatId) &&
                Objects.equals(expertId, that.expertId) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(createPerson, that.createPerson) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updatePerson, that.updatePerson) &&
                Objects.equals(cqStatus, that.cqStatus) &&
                Objects.equals(taskId, that.taskId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, regulatId, expertId, createTime, createPerson, updateTime, updatePerson, cqStatus, taskId);
    }
}
